home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / comm / thor / ThorAPI_ASM.lha / thorapi_asm / includes / libraries / BBSRead.i next >
Text File  |  1997-03-17  |  32KB  |  817 lines

  1.     IFND    LIBRARIES_BBSREAD_I
  2. LIBRARIES_BBSREAD_I    SET    1
  3.  
  4. **
  5. **  From version: BBSRead.h 4.1 (18.06.95)
  6. ** 
  7. **  BBSRead structures and definitions.
  8. **
  9. **  © Copyright 1995 Ultima Thule Software
  10. **  All Rights Reserved.
  11. **
  12. **  Author: Eivind Nordseth
  13. **
  14. **-------------------------------------------------------------------
  15. **
  16. **  Assembler (.i) includes translated by Kenneth "Kenny" Nilsen
  17. **  $VER: BBSRead.i 1.0 (17.3.97)
  18. **
  19. **-------------------------------------------------------------------
  20.  
  21.     IFND    EXEC_TYPES_I
  22.     INCLUDE    "exec/types.i"
  23.     ENDC
  24.  
  25.     IFND    EXEC_NODES_I
  26.     INCLUDE    "exec/nodes.i"
  27.     ENDC
  28.  
  29.     IFND    EXEC_LISTS_I
  30.     INCLUDE    "exec/lists.i"
  31.     ENDC
  32.  
  33.     IFND    LIBRARIES_BBSREADTAGS_I
  34.     INCLUDE    "libraries/bbsreadtags.i"
  35.     ENDC
  36.  
  37.  
  38. BBSREADNAME        DC.B    "bbsread.library",0
  39. BBSREADVERSION        EQU    4
  40.  
  41. ENV_BBSDATAPATH        DC.B    "THOR/BBSDataPath",0
  42. ENV_THORPATH        DC.B    "THOR/THORPath",0
  43.             even
  44.  
  45. **********************************************************************
  46. *
  47. * Global config structures and definitions
  48. *
  49.  
  50.  
  51.     STRUCTURE ArcConfigItem,0
  52.     STRUCT    ac_node,ln_size
  53.     UWORD    sc_pad
  54.     APTR    ac_Name            ;Name of this archiver
  55.     APTR    ac_FindPatern        ;Patern to identify this archiver
  56.     APTR    ac_UnArcCmd        ;Command to unarc an archive
  57.     APTR    ac_ArcCmd        ;Command to add to an archive
  58.     ULONG    ac_OpenCnt        ;Nr of types using this archiver. Private.
  59.     LABEL    ac_sizeof
  60.  
  61.  
  62.     STRUCTURE GlobalConfig,0
  63.     APTR    gc_DnloadPath        ;Path where downloaded files resides
  64.     APTR    gc_UploadPath        ;Path where files to upload resides
  65.     APTR    gc_GlobalUserName    ;Global user name.    (from key file)
  66.  
  67.     ULONG    gc_Buffers        ;Number of buffers to use
  68.     ULONG    gc_BufferSize        ;Size of each buffer
  69.  
  70.     APTR    gc_Signature        ;Global signature, could be a NULL pointer
  71.  
  72.     ULONG    gc_KeepMsg        ;Messages to keep in each conference
  73.     ULONG    gc_KeepTime        ;Time (in seconds) to keep messages in conferences
  74.  
  75.     ULONG    gc_Flags
  76.  
  77.     STRUCT    gc_AvailArc,MLH_Size    ;List of archivers which can be used for (un)packing.
  78.  
  79.     APTR    gc_XpkMethod        ;What xpk method to use when packing
  80.  
  81.     APTR    gc_UserStreet        ;User data from key file.
  82.     APTR    gc_UserAddress
  83.     APTR    gc_UserCountry
  84.     APTR    gc_UserPhone        ;User editable.
  85.  
  86.     APTR    gc_TmpDir        ;Directory to use for temp files while packing
  87.     APTR    gc_TagFile        ;Global tag file. NULL-pointer, no tags
  88.     
  89.     ULONG    gc_HazeLevel1        ;Seconds to keep messages marked with hazelevel 1
  90.     ULONG    gc_HazeLevel2        ;Seconds to keep messages marked with hazelevel 2
  91.     ULONG    gc_HazeLevel3        ;Seconds to keep messages marked with hazelevel 3
  92.     
  93.     APTR    gc_PGPCommand        ;Command for pgp (Default is "(ENV:PGPPATH)pgp")
  94.     APTR    gc_PGPSignID        ;Id to use when PGP signing messages. Default is '*'.
  95.  
  96.     APTR    gc_ReplyString        ;Reply string to use when a message is replied _and_ moved.
  97.  
  98.     APTR    gc_StartupScript    ;Arexx script to be run each time Thor is started.
  99.     APTR    gc_QuitScript        ;Arexx script to be run each time Thor is quited.
  100.  
  101.     APTR    gc_BBSEnterScript    ;Arexx script to be run each time a bbs is entered.
  102.     APTR    gc_BBSLeaveScript    ;Arexx script to be run each time a bbs is left.
  103.  
  104.     APTR    gc_ConfEnterScript    ;Arexx script to be run each time a conf is entered.
  105.     APTR    gc_ConfLeaveScript    ;Arexx script to be run each time a conf is left.
  106.     LONG    gc_QuoteChars        ;String to use as quote chars in custom quote type.
  107.                     ;Max length is 3. The string is NUL terminated.
  108.     LABEL    gc_sizeof
  109.  
  110.  
  111. ;  GlobalConfig.gc_Flags
  112.  
  113. GCF_IGNORE_KEEPMSG    EQU    (1<<0)    ;gc_KeepMsg is ignored. Messages won't
  114.                     ;be counted when packing conferences
  115. GCF_IGNORE_KEEPTIME    EQU    (1<<1)    ;gc_KeepTime is ignored.    Time won't be
  116.                     ;checked when packing conferences
  117. GCF_RESET_EVENT_NR    EQU    (1<<2)    ;Reset event numbers when packing events.
  118. GCF_NO_XPK_METHOD    EQU    (1<<3)    ;Don't use any xpk method
  119. GCF_FILE_SIGNATURE    EQU    (1<<4)    ;The gc_Signature field contains the path
  120.                     ;and name of a file containing the signature.
  121. GCF_AUTO_XPK_PACK    EQU    (1<<5)    ;Automatically xpk pack all new messages
  122.                     ;when are written to the database. NB: A xpk method must have been defined.
  123. GCF_FORCE_PACK_REWRITE    EQU    (1<<6)    ;Force a rewrite when packing conferences
  124. GCF_COMMAND_SIGNATURE    EQU    (1<<7)    ;The gc_Signature field contains the path
  125.                     ;and name of a command. When the command is executed should the signature
  126.                     ;contents be written to stdout. The template for the command is expected to be
  127.                     ;BBSNAME/K,CONFNAME/K.
  128. GCF_ALWAYS_REPLY_STR    EQU    (1<<8)     ;Use reply string on all replies.
  129.  
  130.  
  131. **********************************************************************
  132. *
  133. * BBSType structures and definitions
  134. *
  135.  
  136.  
  137.     STRUCTURE EventConfigItem,0
  138.  
  139.     struct    ec_Node,mln_size
  140.     
  141.     ULONG    ec_Event    ;Identification of this event
  142.     ULONG    ec_NeedTags    ;Pointer to TAG_END-terminated array of tags needed
  143.                 ;for this event (NULL pointer -> no needed tags)
  144.     ULONG    ec_OptTags    ;Pointer to TAG_END-terminated array of optional tags
  145.                 ;for this event (NULL pointer -> no optional tags)
  146.     ULONG    ec_Reserved    ;Reserved for future expansion
  147.     LABEL    ec_SizeOf
  148.  
  149.  
  150. ;  Structure holding BBS-type spesific data  
  151.  
  152.     STRUCTURE TypeData,0
  153.  
  154.     APTR    td_TypeName        ; Name of BBS-type
  155.     APTR    td_MsgParser        ; Command for parsing grabs
  156.     UWORD    td_LineLength        ; Max length of lines in messages
  157.     UWORD    td_SubjectLength    ; Max length of subjects
  158.     UWORD    td_FileDescrLen        ; Max length of short filedescription
  159.     UBYTE    td_CharSet        ; Charset the grab from this BBS typr uses.
  160.                     ; Se bellow for definitions
  161.     UBYTE    td_QuoteType        ; Prefered quote type for this bbstype.
  162.                     ; See below for definitions.
  163.     ULONG    td_AvailScrFlags    ; Mask of flags script uses
  164.     UWORD    td_FileNameLen        ; Max length of filenames allowed
  165.     UWORD    td_pad2
  166.     APTR    td_EventPacker        ; Command for packing events
  167.     APTR    td_EventArchiver    ; Archiver to use when making packages
  168.  
  169.     STRUCT    td_AvailEvents,MLH_SIZE    ; List of struct EventConfigItem
  170.     
  171.     ULONG    td_Flags
  172.     APTR    td_AcceptPattern    ; Pattern for accepting grabs for this bbstype
  173.                     ; NULL equals #?
  174.     APTR    td_InitMsgFile        ; Command for initializing message files
  175.     APTR    td_ExtConfig        ; Command for external configuration
  176.  
  177.     LABEL    td_SIZEOF
  178.  
  179. ; Charsets defined 
  180. BRCS_ANY    EQU    0    ; Any charset, can't be used in BBSTypes.
  181. BRCS_ISO    EQU    1    ; ISO Latin 1 charset.
  182. BRCS_IBN    EQU    2    ; IBM charset used in Norway. Same as IBM CodePage 865.
  183. BRCS_SF7    EQU    3    ; 7-bit charset. Sweden and Finland.
  184. BRCS_NO7    EQU    4    ; 7-bit charset. Norway.
  185. BRCS_DE7    EQU    5    ; 7-bit charset. Denmark.
  186. BRCS_US7    EQU    6    ; 7-bit charset. USA.
  187. BRCS_UK7    EQU    7    ; 7-bit charset. United Kingdom.
  188. BRCS_IT7    EQU    8    ; 7-bit charset. Italia.
  189. BRCS_PO7    EQU    9    ; 7-bit charset. Portugal.
  190. BRCS_SP7    EQU    10    ; 7-bit charset. Espania.
  191. BRCS_GE7    EQU    11    ; 7-bit charset. Germany.
  192. BRCS_FR7    EQU    12    ; 7-bit charset. France.
  193. BRCS_IBM    EQU    13    ; IBM charset. Same as IBM CodePage 437.
  194. BRCS_IBMM    EQU    14    ; IBM multinational charset. Same as IBM CodePage 850.
  195. BRCS_APPLE    EQU    15    ; Apple charset.
  196. BRCS_NO_OF    EQU    15    ; Number of charset defined.
  197.  
  198.  
  199. ; Charset equivalents
  200.  
  201. BRCS_ISO8859.1    EQU    BRCS_ISO
  202.  
  203. BRCS_ISO_IR002    EQU    BRCS_US7
  204. BRCS_ISO_IR004    EQU    BRCS_UK7
  205. BRCS_ISO_IR010    EQU    BRCS_SF7
  206. BRCS_ISO_IR011    EQU    BRCS_SF7
  207. BRCS_ISO_IR015    EQU    BRCS_IT7
  208. BRCS_ISO_IR016    EQU    BRCS_PO7
  209. BRCS_ISO_IR017    EQU    BRCS_SP7
  210. BRCS_ISO_IR021    EQU    BRCS_GE7
  211. BRCS_ISO_IR060    EQU    BRCS_NO7
  212. BRCS_ISO_IR061    EQU    BRCS_NO7
  213. BRCS_ISO_IR069    EQU    BRCS_FR7
  214.  
  215. BRCS_IBM_CP437    EQU    BRCS_IBM
  216. BRCS_IBM_CP850    EQU    BRCS_IBMM
  217. BRCS_IBM_CP865    EQU    BRCS_IBN
  218.  
  219.  
  220. ;  TypeData.td_AvailScrFlags  
  221. SF_NEWFILES    EQU    (1<<0)        ; Do newfiles scan every logon
  222. SF_AUTOPDNL    EQU    (1<<1)        ; Automaticaly download private files
  223. SF_AUTOLOGOFF    EQU    (1<<2)        ; Automaticaly logoff after all is done
  224. SF_USECOLORS    EQU    (1<<3)        ; Use colors on BBS
  225. SF_ANSIMENUES    EQU    (1<<4)        ; Use ANSI menues
  226. SF_BULLETINS    EQU    (1<<5)        ; Get new bulletins on every logon
  227.  
  228.  
  229. ;  TypeData.td_QuoteType, BBSData.bd_QuoteType, ConfData.cd_QuoteType  
  230.  
  231. QT_USE_SUPER    EQU    0        ; In TypeData.td_QuoteType: Same as QT_DEFAULT.
  232.                     ; In BBSData.bd_QuoteType:  Use quotetype defined for the BBSType.
  233.                     ; In ConfData.cd_QuoteType: Use quotetype defined for the BBS.
  234. QT_NONE         EQU    1         ; No quoting.
  235. QT_DEFAULT      EQU    2         ; Default quote char. (">")
  236. QT_DEF_SPACE    EQU    3         ; Default quote char pluss space. ("> ")
  237. QT_CUSTOM       EQU    4         ; Custom quote chars defined in QuoteChars field.
  238. QT_INITIALS     EQU    5         ; Use initials as quote chars.
  239.  
  240.  
  241. ; TypeData.td_Flags  
  242. TDF_NO_NAME_CHECK    EQU    (1<<0)    ; Don't check BBSData->bd_UserName/
  243.                     ; ConfData->cd_Alias when adding messages
  244. TDF_NO_ADDR_CHECK    EQU    (1<<1)    ; Don't check BBSData->bd_UserAddr when
  245.                     ; adding messages
  246. TDF_SELECT_ADD_USER    EQU    (1<<2)    ; BBSType supports selectable user adding.
  247. TDF_ADD_USERS        EQU    (1<<3)    ; The parser for this eventtype adds users
  248.                     ; to the user database by default. Used by ConfigBBS() when creatig new BBS'es.
  249. TDF_ABS_LINELENGTH    EQU    (1<<4)    ; The line length in messages from this bbs
  250.                     ; type is never longer than defined for the conf/bbs/bbsttype.
  251. TDF_MULTIPLE_CONFS    EQU    (1<<5)    ; BBSType supports "conf1,conf2,...,confn"
  252.                     ; in BREV_Conference tag.
  253. TDF_MULTIPLE_TO        EQU    (1<<6)    ; BBSType supports "to1,to2,...,ton" in
  254.                     ; BREV_ToName and/or BREV_ToAddr. If both BREV_ToName and BREV_ToAddr tags are
  255.                     ; used must name x in BREV_ToName correspond to address x in BREV_ToAddr.
  256. TDF_REFLOW_QUOTING    EQU    (1<<7)    ; Reflow quoting should be on as default
  257.                     ; when answering messages.
  258. TDF_GLOBAL_REPLIES    EQU    (1<<8)    ; BRMSG_MsgID or BRMSG_OrginalNr is globaly
  259.                     ; unique and can be used when repling messages to another conference than the
  260.                     ; orginal.    See BREV_RefConference tag.    
  261. TDF_NAME_REPLIES    EQU    (1<<9)    ; It is possible to reply messages to
  262.                     ; another user than the author of the orginal message.
  263. TDF_REPLY_SUBJ_PREFIX    EQU    (1<<10)    ; Use "Re: " as subject prefix on replies.
  264. TDF_EVENTS_HANDELED    EQU    (1<<11)    ; The library shouldn't ask if packed
  265.                     ; events should be deleted when parsing. This is handled by the event
  266.                     ; packer/parser.    
  267.  
  268. TDF_SUPPORTS_ENCODE_8BIT_MAIL        EQU    (1<<12)    ; Supports encoding of 8-bit
  269.                             ; messages only in mail conferences.    
  270. TDF_SUPPORTS_ENCODE_8BIT_MSGS        EQU    (1<<13)    ; Supports encoding of 8-bit
  271.                             ; messages in public conferences.    
  272. TDF_SUPPORTS_MULTIPLE_ATTACHMENTS    EQU    (1<<14)    ; Supports multiple attachments
  273.  
  274.  
  275. ;  Structure used in List returned by GetTypeList
  276.  
  277.     STRUCTURE TypeListItem,0
  278.  
  279.     STRUCT    tl_Node,LN_size        ;Caller is free to use nl_Name
  280.     WORD    tl_pad
  281.     APTR    tl_Link            ;Private!!!!!!!!
  282.     APTR    tl_UserData        ;For use by the caller; no restrictions!
  283.     STRUCT    tl_Data,td_sizeof    ;Pointer to the Type data
  284.     LABEL    tl_sizeof
  285.  
  286.  
  287. **********************************************************************
  288. *
  289. * BBS structures and definitions
  290. *
  291.  
  292.  
  293. ;  Structure holding user modifiable BBS data  
  294.  
  295.     STRUCTURE BBSData,0
  296.  
  297.     APTR    bd_Name            ; Name of BBS
  298.     APTR    bd_GrabName        ; Name of grabfile (without extension) or with wildcards
  299.     APTR    bd_BBSType        ; Type of BBS, used when splitting grabs and scripting
  300.     APTR    bd_UserName        ; The name the user is registered as
  301.     APTR    bd_Signature        ; Signature to use on this BBS, could be a NULL-pointer
  302.  
  303.     UWORD    bd_LineLength        ; Max linelength in messages. Overrides TypeData if >0
  304.     UBYTE    bd_CharSet        ; Charset for the grab from this BBS uses. Overrides
  305.                     ; TypeData if != BRCS_ANY
  306.     UBYTE    bd_QuoteType        ; Prefered quite type for this bbs. See above for definitions.
  307.  
  308.     ULONG    bd_ScrFlags        ; Flags for script (for definitions se TypeData)
  309.     ULONG    bd_Flags        ; Flags for this BBS
  310.  
  311.     ULONG    bd_KeepMsg        ; Messages to keep in each conference
  312.     ULONG    bd_KeepTime        ; Time (in seconds) to keep messages in conferences
  313.  
  314.     APTR    bd_EMailAddr        ; The address the user has on the bbs
  315.     APTR    bd_XpkMethod        ; What xpk method to use when packing this bbs
  316.  
  317.     APTR    bd_UserStreet        ; User data to override GlobalConfig
  318.     APTR    bd_UserAddress        ; NULL equals to value in GlobalConfig
  319.     APTR    bd_UserCountry
  320.     APTR    bd_UserPhone
  321.     APTR    bd_Alias        ; Alias used on this BBS. NULL-pointer, no alias
  322.                     ; This alias will only be used in conferences
  323.                     ; marked with CDF_ALIAS.
  324.     APTR    bd_DnloadPath;        ; Dnloadpath for this BBS. Overrides global settings
  325.     APTR    bd_TagFile        ; Tagfile to use on this BBS. NULL-pointer, use global
  326.     APTR    bd_EventArchiver    ; Archiver to use when packing the events from this BBS
  327.                     ; Overrides the setting in the BBSType if non NULL.
  328.     APTR    bd_ReplyPacket        ; File name of eventual reply packet. Is expected to be
  329.                     ; relative to the defined upload dir for this bbs.
  330.     APTR    bd_UploadPath        ; Upload path for this BBS. Overrides global settings
  331.     APTR    bd_ReplyString        ; Reply string to use when a message is replied _and_
  332.                     ; moved. NULL means: Use global reply string.
  333.     APTR    bd_BBSEnterScript    ; Arexx script to be run each time this bbs is
  334.                     ; entered. Overrides global setting.
  335.     APTR    bd_BBSLeaveScript    ; Arexx script to be run each time this bbs is left.
  336.                     ; Overrides global setting.
  337.     APTR    bd_ConfEnterScript    ; Arexx script to be run each time a conference on
  338.                     ; this bbs is entered. Overrides global setting.
  339.     APTR    bd_ConfLeaveScript    ; Arexx script to be run each time a conference on
  340.                     ; this bbs is left. Overrides global setting.
  341.     LONG    bd_QuoteChars        ; String to use as quote chars in custom quote type.
  342.                     ; Max length is 3. The string is NUL terminated.
  343.     LABEL    bd_sizeof
  344.  
  345.  
  346. ;  BBSData.bd_Flags  
  347. BDF_GLOBAL_KEEPMSG    EQU    (1<<0)    ; Use global KeepMsg for this BBS
  348. BDF_GLOBAL_KEEPTIME    EQU    (1<<1)    ; Use global KeepTime for this BBS
  349. BDF_IGNORE_KEEPMSG    EQU    (1<<2)    ; bd_KeepMsg is ignored. Messages won't
  350.                     ;    be counted when packing conferences
  351. BDF_IGNORE_KEEPTIME    EQU    (1<<3)    ; bd_KeepTime is ignored.    Time won't be
  352.                     ; checked when packing conferences
  353. BDF_NO_XPK_METHOD    EQU    (1<<4)    ; Don't use any xpk method on this bbs
  354.  
  355.  * This flag is used to show that the events for this bbs has changed since last
  356.  * call to MakeEventPackage(). It is maintained by the library, and should normally
  357.  * not be set or cleard by other. A successfull call to MakeEventPackage() will
  358.  * clear the flag.
  359.  
  360. BDF_EVENTS_CHANGED    EQU    (1<<5)
  361. BDF_NO_SIGNATURE    EQU    (1<<6)    ; Don't use signatures on this bbs
  362. BDF_MARK_OWN_MSGS    EQU    (1<<7)    ; Also mark messages from user when adding
  363.                     ; messages with the WBRMSG_MarkMessage tag
  364. BDF_NO_TAGS        EQU    (1<<8)    ; Don't use tags on this bbs
  365. BDF_ADD_USERS        EQU    (1<<9)    ; The parser for this bbs should add users
  366.                     ; to the database if it supports it.
  367. BDF_FILE_SIGNATURE    EQU    (1<<10)    ; The bd_Signature field contains the path
  368.                     ; and name of a file containing the signature.    
  369. BDF_AUTO_XPK_PACK    EQU    (1<<11)    ; Automatically xpk pack new messages when
  370.                     ; they are written to this bbs. NB: A xpk method must have been defined.
  371. BDF_NO_AUTO_XPK_PACK    EQU    (1<<12)    ; No automatically xpk packing on this bbs.
  372.                     ; Overrides global flags for auto xpk packing.    
  373. BDF_COMMAND_SIGNATURE    EQU    (1<<13)    ; The bd_Signature field contains the path
  374.                     ; and name of a command. When the command is executed should the signature
  375.                     ; contents be written to stdout. The template for the command is expected to be
  376.                     ; BBSNAME/K,CONFNAME/K.    
  377. BDF_REFLOW_QUOTING    EQU    (1<<14)    ; Reflow quoting should be on as default
  378.                     ; when answering messages. This flag should only be considered when
  379.                     ; bd_QuoteType is != QT_USE_SUPER.    
  380. BDF_ALWAYS_REPLY_STR    EQU    (1<<15)    ; Use reply string on all replies. This
  381.                     ; flag should only be considered when bd_ReplyString is non NULL.
  382. BDF_NO_REPLY_STR    EQU    (1<<16)    ; Don't use reply strings on this bbs.
  383.                     ; Overrides the setting of bd_ReplyString.
  384. BDF_GLOBAL_REPLY_STR    EQU    (1<<17)    ; Use global reply string settings.
  385.                     ; Overrides all other bbs reply string settings.    
  386. BDF_NO_BBS_ENTER_SCR    EQU    (1<<18)    ; Don't use a bbs enter script on this bbs.
  387. BDF_NO_BBS_LEAVE_SCR    EQU    (1<<19)    ; Don't use a bbs leave script on this bbs.
  388. BDF_NO_CONF_ENTER_SCR    EQU    (1<<20)    ; Don't use a conference enter script on this bbs.
  389. BDF_NO_CONF_LEAVE_SCR     EQU    (1<<21)    ; Don't use a conference leave script on this bbs.
  390. BDF_ENCODE_8BIT_MAIL    EQU    (1<<22)    ; Encode 8 bits messages in mail conferences. Only
  391.                     ; appliable when the TDF_SUPPORTS_ENCODE_8BIT_MAIL flag is set for the bbstype.
  392. BDF_ENCODE_8BIT_MSGS    EQU    (1<<23)    ; Encode 8 bits messages in public conferences. Only
  393.                     ; appliable when the TDF_SUPPORTS_ENCODE_8BIT_MSGS flag is set for the bbstype.
  394.  
  395. ;  Structure holding BBS data maintained by the library
  396.  
  397.     STRUCTURE BBSInternal,0
  398.  
  399.     ULONG    bi_FirstEvent    ; First event for this BBS
  400.     ULONG    bi_LastEvent    ; Last event for this BBS
  401.     ULONG    bi_NumEvents    ; Number of active events (not deleted or done)
  402.  
  403.     ULONG    bi_FirstUser    ; First user in userfile
  404.     ULONG    bi_LastUser    ; Last user in userfile
  405.     ULONG    bi_NumUsers    ; Number of active users in userfile
  406.  
  407.     ULONG    bi_FirstKill    ; First kill in killfile
  408.     ULONG    bi_LastKill    ; Number of last kill in killfile
  409.     ULONG    bi_NumKills    ; Number of active kills in killfile
  410.  
  411.     ULONG    bi_SumMarked    ; Nr of marked messages on this BBS
  412.                 ; This field should be regarded as a BOOL until you
  413.                 ; have obtained a conference list for the bbs.
  414.                 ; This field will only be updated during UpdateStruct()
  415.     ULONG    bi_SumM2User    ; Nr of marked messages on this BBS to the user
  416.                 ; This field should be regarded as a BOOL until you
  417.                 ; have obtained a conference list for the bbs.
  418.                 ; This field will only be updated during UpdateStruct()
  419.     LABEL    bi_sizeof
  420.  
  421.  
  422. ;  Structure used in List returned by GetBBSList
  423.  
  424.     STRUCTURE BBSListItem,0
  425.  
  426.     STRUCT    bl_Node,LN_SIZE        ; Caller is free to use nl_Name
  427.     WORD    bl_pad
  428.     APTR    bl_Link            ; Private!!!!!!!!
  429.     APTR    bl_UserData        ; For use by the caller; no restrictions!
  430.  
  431.     STRUCT    bl_Data,bd_sizeof    ; Pointer to the BBS data
  432.     STRUCT    bl_Internal,bi_sizeof    ; Pointer to public internal data
  433.  
  434.     APTR    bl_BBSPath        ; Path to the data directory for this BBS
  435.                     ; Used for textfiles. Ends with a '/'
  436.     ULONG    bl_ChangeCnt        ; Private!!!!!!!!
  437.  
  438.     LABEL    bl_sizeof
  439.  
  440. **********************************************************************
  441. *
  442. * Conference structures and definitions
  443. *
  444.  
  445.  
  446. ;  Structure holding general conference data  
  447.  
  448.     STRUCTURE ConfData,0
  449.  
  450.     APTR    cd_Name            ; Name of Conference                
  451.     ULONG    cd_KeepMsg        ; Max number of messages to keep            
  452.     ULONG    cd_KeepTime        ; Oldest msg to keep (time in seconds)                    
  453.     APTR    cd_Signature        ; Signature for conference, could be a NULL-pointer    
  454.     APTR    cd_Alias        ; Alias used in conference, NULL pointer, no alias        
  455.     LONG    cd_BBSConfNr        ; The internal number a conference has on the BBS            
  456.     UWORD    cd_LineLength        ; Max linelength in messages. Overrides BBSData if > 0    
  457.     UBYTE    cd_CharSet        ; Charset for the grab from this conf. Overrides            
  458.                     ; BBSData if != BRCS_ANY                                            
  459.     UBYTE    cd_QuoteType        ; Prefered quite type for this conf. See above for         
  460.                     ; definitions.                                                        
  461.     ULONG    cd_Flags
  462.  
  463.     APTR    cd_XpkMethod        ; What xpk method to use when packing this conference            
  464.     APTR    cd_TagFile        ; Tagfile to use in this conf. NULL-pointer, use bbs                
  465.     APTR    cd_EMailAddr        ; The Email address the user has in this conference. For use    
  466.                     ; on bbses where the user is member of more than one net.        
  467.     APTR    cd_ReplyString        ; Reply string to use when a message is replied _and_            
  468.                     ; moved. NULL means: Use bbs reply string.                         
  469.     APTR    cd_ConfEnterScript    ; Arexx script to be run each time this conference     
  470.                     ; is entered. Overrides bbs setting.                        
  471.     APTR    cd_ConfLeaveScript    ; Arexx script to be run each time this conference     
  472.                     ; is left. Overrides bbs setting.                            
  473.     ULONG    cd_QuoteChars        ; String to use as quote chars in custom quote type. 
  474.                     ; Max length is 3. The string is NUL terminated.        
  475.     UBYTE    cd_ConfNetType        ; States which type of net the conference is on. To     
  476.                     ; be used on bbses of bbstypes which support serveral nettypes. Should only     
  477.                     ; be set by parser/packer for the bbstype. Se below for defines.                    
  478.     STRUCT    cd_reserved,3
  479.  
  480.     LABEL    cd_sizeof
  481.  
  482.  
  483. ;  ConfData.cd_Flags  
  484.  
  485. CDF_MEMBER_OF        EQU    (1<<0)    ; Member of this conference
  486. CDF_MAIL        EQU    (1<<1)    ; Mail conference
  487. CDF_READ_ONLY        EQU    (1<<2)    ; Read only conference
  488. CDF_COMPULSORY        EQU    (1<<3)    ; Compulsory conference
  489. CDF_FILE_INFO        EQU    (1<<4)    ; File info conference
  490. CDF_USER_INFO        EQU    (1<<5)    ; User info conference
  491. CDF_PRIVATE_ALLOWED    EQU    (1<<6)    ; Private messages allowed
  492. CDF_ENTER_ONLY_TO_ALL    EQU    (1<<7)    ; Enter only allowed to ALL
  493. CDF_ALIAS        EQU    (1<<8)    ; Alias conference
  494. CDF_BBS_KEEPMSG        EQU    (1<<9)    ; Use BBS KeepMsg for this Conf
  495. CDF_BBS_KEEPTIME    EQU    (1<<10)    ; Use BBS KeepTime for this Conf
  496. CDF_IGNORE_KEEPMSG    EQU    (1<<11)    ; cd_KeepMsg is ignored. Messages won't
  497.                     ; be counted when packing conference
  498. CDF_IGNORE_KEEPTIME    EQU    (1<<12)    ; cd_KeepTime is ignored. Time won't be
  499.                     ; checked when packing conference
  500. CDF_NO_XPK_METHOD    EQU    (1<<13)    ; Don't use any xpk method on this conf
  501. CDF_NO_SIGNATURE    EQU    (1<<14)    ; Don't use any signature in this conf
  502. CDF_NOT_ON_BBS        EQU    (1<<15)    ; This conference is not on the BBS
  503. CDF_NO_TAGS        EQU    (1<<16)    ; Don't use message tags in this conf
  504. CDF_REPLY_ONLY_TO_ALL     EQU    (1<<17)    ; Replies should be adresses to all
  505.                     ; If both CDF_REPLY_ONLY_TO_ALL and CDF_ENTER_ONLY_TO_ALL flags is set are
  506.                     ; all messages in the conference addressed to all.
  507. CDF_NO_LINEWRAP_DISPLAY    EQU    (1<<18) ; Don't line wrap messages in this
  508.                     ; conference when they are displayed. Should be used for conferences with
  509.                     ; messages with ansi-codes. Typical conferences are conferences which are
  510.                     ; used to display bulletins from the bbs.    
  511. CDF_FILE_SIGNATURE    EQU    (1<<19)    ; The cd_Signature field contains the
  512.                     ; path and name of a file containing the signature.
  513. CDF_AUTO_XPK_PACK    EQU    (1<<20)    ; Automatically xpk pack new messages
  514.                     ; when they are written to this conference. NB: A xpk method must have been
  515.                     ; defined.    
  516. CDF_NO_AUTO_XPK_PACK    EQU    (1<<21)    ; No automatically xpk packing in this
  517.                     ; conference. Overrides bbs og global flags for auto xpk packing.
  518. CDF_MARK_OWN_MSGS    EQU    (1<<22)    ; Also mark messages from user when
  519.                     ; adding messages with the WBRMSG_MarkMessage tag in this conference.
  520. CDF_COMMAND_SIGNATURE    EQU    (1<<23)    ; The cd_Signature field contains the path
  521.                     ; and name of a command. When the command is executed should the signature
  522.                     ; contents be written to stdout. The template for the command is expected to be
  523.                     ; BBSNAME/K,CONFNAME/K.    
  524. CDF_REFLOW_QUOTING     EQU    (1<<24)    ; Reflow quoting should be on as default
  525.                     ; when answering messages. This flag should only be considered when
  526.                     ; cd_QuoteType is != QT_USE_SUPER.    
  527. CDF_ALWAYS_REPLY_STR    EQU    (1<<25)    ; Use reply string on all replies. This
  528.                     ; flag should only be considered when cd_ReplyString is non NULL.
  529. CDF_NO_REPLY_STR    EQU    (1<<26)    ; Don't use reply strings in this conf.
  530.                     ; Overrides the setting of cd_ReplyString.
  531. CDF_BBS_REPLY_STR    EQU    (1<<27)    ; Use bbs reply string settings.
  532.                     ; Overrides all other conference reply string settings.
  533. CDF_NO_CONF_ENTER_SCR    EQU    (1<<28)    ; Don't use a conference enter script in this conference.
  534. CDF_NO_CONF_LEAVE_SCR    EQU    (1<<29)    ; Don't use a conference leave script on this conference.
  535. CDF_FORCE_PACK_REWRITE    EQU    (1<<30)    ; Force a rewrite next time this conference
  536.                     ; is packed. If the packing succeed will the flagg be cleared.
  537. CDF_ATTACH_FORBIDDEN    EQU    (1<<31)    ; User may not attach files in this conference.
  538.  
  539.  
  540. ;  ConfData.cd_ConfNetType   
  541.  
  542. CDNT_NONET        EQU    0    ; This conference is a local conference. This is the
  543.                     ; default values for new conferences.
  544. CDNT_FIDONET        EQU    1    ; This conference is a Fido net conference.
  545. CDNT_USENET        EQU    2    ; This conference is a usenet conference.
  546.  
  547.  
  548. ;  Structure holding conference data maintained by the library 
  549.  
  550.     STRUCTURE ConfInternal,0
  551.  
  552.     ULONG    ci_FirstMsg        ; First message in conference
  553.     ULONG    ci_LastMsg        ; Last message in conference
  554.     ULONG    ci_NumMessages        ; Number of active messages in conference
  555.     ULONG    ci_MsgMarked        ; Number of messages marked
  556.     ULONG    ci_Marked2User        ; Number of marked messages to user
  557.     LABEL    ci_sizeof
  558.  
  559.  
  560. ;  Structure used in List returned by GetConfList  
  561.  
  562.     STRUCTURE ConfListItem,0
  563.  
  564.     STRUCT    cl_Node,LN_Size        ; Caller is free to use nl_Name
  565.     WORD    cl_pad
  566.     APTR    cl_Link            ; Private!!!!!!!!
  567.     APTR    cl_UserData        ; For use by the caller; no restrictions!
  568.     STRUCT    cl_Data,cd_sizeof    ; Pointer to the conference data
  569.     STRUCT    cl_Internal,ci_sizeof    ; Pointer to public internal data
  570.     ULONG    cl_ChangeCnt        ; Private!!!!!!!!
  571.     LABEL    cl_sizeof
  572.  
  573.  
  574. **********************************************************************
  575. *
  576. * File area structures and definitions
  577. *
  578.  
  579.  
  580. ;  Structure holding general file area data  
  581.  
  582.     STRUCTURE FAreaData,0
  583.  
  584.     APTR    ad_Name;        ; Name of file area
  585.     LABEL    ad_sizeof
  586.  
  587.  
  588. ;  Structure holding file area data maintained by the library 
  589.  
  590.     STRUCTURE FAreaInternal,0
  591.  
  592.     ULONG    ai_FirstFile        ; Number of the first file in this area
  593.     ULONG    ai_NumFiles        ; Number of files in this area
  594.     LABEL    ai_sizeof
  595.  
  596.  
  597. ;  Structure used in List returned by GetFAreaList  
  598.  
  599.     STRUCTURE FAreaListItem,0
  600.  
  601.     STRUCT    al_Node,LN_SIZE        ; Caller is free to use nl_Name
  602.     WORD    al_pad
  603.     APTR    al_Link            ; Private!!!!!!!!
  604.     APTR    al_UserData        ; For use by the caller; no restrictions!
  605.     STRUCT    al_Data,ad_sizeof    ; Pointer to the file area data
  606.     STRUCT    al_Internal,ai_sizeof    ; Pointer to public internal data
  607.  
  608.     ULONG    al_ChangeCnt        ; Private!!!!!!!!
  609.     LABEL    al_sizeof
  610.  
  611.  
  612. **********************************************************************
  613. *
  614. * Passive Conference list structures and definitions
  615. *
  616.  
  617.  
  618.     STRUCTURE PassConfListItem,0
  619.  
  620.     STRUCT    pl_Node,ln_size        ; Caller is free to use nl_Name
  621.     WORD    pl_pad
  622.     APTR    pl_Name            ; Must always be set.
  623.     APTR    pl_Description        ; NULL equals no available description
  624.     LONG    pl_BBSConfNr        ; The internal number the conf has on the bbs
  625.     ULONG    pl_Flags        ; Same as CondData.cd_Data.
  626.     LABEL    pl_sizeof
  627.  
  628. **********************************************************************
  629. *
  630. * Message, event, user, kill, file flags and definitions.
  631. *
  632.  
  633.  
  634. ;  Message flags (Returned by GBRMSG_Flags tag)
  635.  
  636. MDF_READ        EQU    (1<<0)    ; Message is read
  637. MDF_REPLIED        EQU    (1<<1)    ; Message is replied
  638. MDF_PRIVATE        EQU    (1<<2)    ; Message is private
  639. MDF_TO_USER        EQU    (1<<3)    ; Message is to the user
  640. MDF_FROM_USER        EQU    (1<<4)    ; Message is from the user
  641. MDF_DELETED        EQU    (1<<5)    ; Message is deleted
  642. MDF_UNRECOVERABLE    EQU    (1<<6)    ; Message is can not be undeleted
  643. MDF_KEEP        EQU    (1<<7)    ; Keep message. Message will not be deleted
  644.                     ; during packing of conference
  645. MDF_TO_ALL        EQU    (1<<8)    ; Message is to all (has no reciever)
  646. MDF_XPK_TEXT        EQU    (1<<9)    ; Message text is Xpk'ed (Private flag)
  647. MDF_MARKED        EQU    (1<<10)    ; Message is marked (Private flag)
  648. MDF_URGENT        EQU    (1<<11)    ; Message is urgent
  649. MDF_IMPORTANT        EQU    (1<<12)    ; Message is important
  650. MDF_SUPERMARKED        EQU    (1<<13)    ; Message will not be unmarked as long as this flag is set.
  651.  
  652. MDF_BINARY_PARTS    EQU    (1<<14)    ; Message contains 1 or more BRMSG_BinaryPart tags
  653. MDF_TEXT_PARTS        EQU    (1<<15)    ; Message contains 1 or more BRMSG_TextPart tags
  654.                     ; These two flags does also concern possible message parts.    
  655.  
  656. MDF_MESSAGE_PARTS    EQU    (1<<16)    ; Message contains 1 or more BRMSG_MsgPart tags
  657. MDF_CONFIDENTIAL    EQU    (1<<17)    ; Message is confidential
  658.  
  659. MDF_HAZE_BIT0        EQU    (1<<24)    ; Use MsgHazeLevel macro to extract haze
  660. MDF_HAZE_BIT1        EQU    (1<<25)    ; level from message flags.
  661.  
  662. ;[dunno about this one  -Kenny]
  663. ;MsgHazeLevel(msgflags) ((msgflags & (MDF_HAZE_BIT0 | MDF_HAZE_BIT1)) >> 24)
  664.  
  665.  
  666. ;  Event flags (Returned by RBREV_Flags tag)
  667. EDF_DELETED        EQU    (1<<0)    ; Event is deleted
  668. EDF_PACKED        EQU    (1<<1)    ; Event is packed
  669. EDF_DONE        EQU    (1<<2)    ; Event is done
  670. EDF_ERROR        EQU    (1<<3)    ; Error performing this event
  671. EDF_UNRECOVERABLE    EQU    (1<<4)    ; Event can not be undeleted
  672. EDF_FREEZE        EQU    (1<<5)    ; Event is frozen. Will not be done as long as this flag is set.
  673.  
  674.  
  675. ;  Event types supported
  676.  
  677. EVE_ENTERMSG        EQU    0    ; Enter message
  678. EVE_REPLYMSG        EQU    1    ; Reply message
  679. EVE_JOINCONF        EQU    2    ; Join conference
  680. EVE_RESIGNCONF        EQU    3    ; Resign conference
  681. EVE_DOWNLOAD        EQU    4    ; Download file
  682. EVE_UPLOAD        EQU    5    ; Upload file
  683. EVE_CONFLIST        EQU    6    ; Get conflist
  684. EVE_CONFIGUREBBS    EQU    7    ; Set correct configuration on the bbs.
  685. EVE_SENDUSERINFO    EQU    8    ; Send userinfo
  686. EVE_GETMESSAGES        EQU    9    ; Get specified messages
  687. EVE_FORWARDMSG        EQU    EVE_GETMESSAGES    ; Forward a message
  688. EVE_GETNEWFILES        EQU    10    ; Get new files listing
  689. EVE_DOCOMMAND        EQU    11    ; Command the script should do
  690. EVE_AUTOLOGOFF        EQU    12    ; Autologoff on next session
  691. EVE_RETRACTMSG        EQU    13    ; Retract message from bbs
  692. EVE_RETRACTFILE        EQU    14    ; Retract file from bbs
  693. EVE_MAXEVENT        EQU    15
  694.  
  695.  
  696. ;  User flags (Returned by RBRUSR_Flags tag)
  697. UDF_DELETED        EQU    (1<<0)    ; User is deleted
  698. UDF_UNRECOVERABLE    EQU    (1<<1)    ; User can not be undeleted
  699.  
  700.  
  701. ;  Kill flags (Returned by RBRK_Flags tag)
  702. KDF_DELETED        EQU    (1<<0)    ; Kill is deleted
  703. KDF_UNRECOVERABLE      EQU    (1<<1)    ; Kill can not be undeleted
  704. KDF_MARK_KEEP        EQU    (1<<2)    ; Mark message with MDF_KEEP if matched
  705. KDF_MARK_URGENT        EQU    (1<<3)    ; Mark message with MDF_URGENT if matched
  706. KDF_MARK_IMPORTANT    EQU    (1<<4)    ; Mark message with MDF_IMPORTANT if matched
  707.  
  708. KDF_MARK_HAZE_BIT0    EQU    (1<<24)    ; Use KillHazeLevel macro to extract haze
  709. KDF_MARK_HAZE_BIT1    EQU    (1<<25)    ; level from kill flags.
  710.  
  711. ;[dunno about this one either -Kenny]
  712. ;KillHazeLevel(killflags) ((killflags & (KDF_MARK_HAZE_BIT0 | KDF_MARK_HAZE_BIT1)) >> 24)
  713.  
  714.  
  715. ;  File flags (Returned by RBRF_Flags tag)
  716. FDF_DELETED        EQU    (1<<0)    ; File is deleted
  717. FDF_UNRECOVERABLE    EQU    (1<<1)    ; File is unrecoverable
  718.  
  719.  
  720.  
  721. **********************************************************************
  722. *
  723. *  Search result structures and definitions.
  724. *
  725.  
  726.  
  727. ;[not sure if this one is correct -Kenny]
  728.  
  729.     STRUCTURE SearchResult,0    ; Structure returned from SearchBRMessage()
  730.     APTR    sr_NextResult        ; Link to next SearchResult
  731.     ULONG    sr_MsgsFound        ; Number of messagenumbers in the buffer
  732.     ULONG    sr_Messages        ; Buffer holding the messagenumbers
  733.                     ; NULL-terminated.
  734.     LABEL    sr_sizeof
  735.  
  736.  
  737.     STRUCTURE UserSuggestion,0    ; Structure returned from SearchBRUser()
  738.     STRUCT    us_Node,ln_size        ; us_Node.ln_Name contains the name of the user
  739.     ULONG    us_UserNr        ; Number of user found
  740.     LABEL    us_sizeof
  741.  
  742.  
  743.     STRUCTURE FoundFile,0
  744.     ULONG    ff_FileNr        ; Number of file found
  745.     STRUCT    ff_FArea,al_sizeof    ; File area file belongs to. This is a list
  746.                     ; item from the SBRF_SearchFAreaList or the
  747.                     ; SBRF_SearchFArea.
  748.     LABEL    ff_sizeof
  749.  
  750.  
  751.     STRUCTURE SFileResult,0        ; Structure returned by SearchBRFile()
  752.     APTR    fr_NextResult        ; Link to next SFileResult
  753.     ULONG    fr_FilesFound        ; Number of files in *this* SFileResult
  754.     STRUCT    fr_Files,ff_sizeof    ; Buffer holding FoundFile structures
  755.     LABEL    fr_sizeof
  756.  
  757.  
  758.     STRUCTURE FoundUser,0
  759.     ULONG    fu_UserNr        ; Number of user found
  760.     ULONG    fu_FoundInTag        ; In which tag the search string was found first in
  761.     LABEL    fu_sizeof
  762.  
  763.  
  764.     STRUCTURE SUserResult,0        ; Structure returned by SearchBRUser()
  765.     APTR    ur_NextResult        ; Link to next SUserResult
  766.     ULONG    ur_UsersFound        ; Number of users in *this* SUserResult
  767.     STRUCT    ur_Users,fu_sizeof    ; Buffer holding FoundUser structures
  768.     LABEL    ur_sizeof
  769.  
  770.  
  771.  
  772. **********************************************************************
  773. *
  774. *  Structure returned with data about user.
  775. *
  776.  
  777.  
  778.     STRUCTURE UserData,0        ; Structure returned by BBSUserData()
  779.     APTR    ud_Name
  780.     APTR    ud_Street
  781.     APTR    ud_Address
  782.     APTR    ud_Country
  783.      APTR    ud_Phone        ; May be NULL
  784.     LABEL    ud_sizeof
  785.  
  786.  
  787. **********************************************************************
  788. *
  789. *  Structures passed to callback hooks.
  790. *
  791.  
  792. DEF_PROGRESS_UPDATES    EQU    100    ; Default progress callbacks on each pass
  793.  
  794. ;Prototype for the progress callback hook function should be:
  795. ;    ULONG __saveds __asm DoBRProgress(register __a0 struct Hook *hook, 
  796. ;        register __a2 struct BRProgress *progress, register __a1 APTR message);
  797. ;    No messages defined yet. The messages parameter will always be NULL;
  798.  
  799.  
  800.     STRUCTURE BRProgress,0        ; Structure passed as object to the different progress callback hooks
  801.  
  802.     ULONG    brp_Pass        ; Some operations are done in more than one pass
  803.     ULONG    brp_First        ; First object in this pass.
  804.     ULONG    brp_Last        ; Last object in this pass.
  805.                     ; brp_First may be greater than brp_Last!
  806.     ULONG    brp_Current        ; Current object.
  807.     ULONG    brp_Actions        ; How many objects so far which has been altered.
  808.     ULONG    brp_Skip        ; How manu objects done between each call to the hook. (read only)
  809.     ULONG    brp_LastPass        ; Is set to the value of brp_Pass had the last call to the hook.
  810.                                ; Is 0 in first call to hook
  811.     LABEL    brp_sizeof
  812.  
  813. ;pewh! -Kenny
  814.  
  815.  
  816.     ENDC    ; LIBRARIES_BBSREAD_I
  817.